Release 10.1A: OpenEdge Development:
Programming Interfaces
Managing sockets and their connections
To manage a socket and its connection, the 4GL allows you to:
- Test if the socket is connected — If the
CONNECTED( )socket method isTRUE, the socket is connected.- Control event sensitivity — At any time, you can make the socket stop receiving
READ-RESPONSEevents by setting itsSENSITIVEattribute toFALSE. You can, at any time, return it to receivingREAD-RESPONSEevents by settingSENSITIVEtoTRUE.- Set socket options — Progress supports the following options:
- Obtain host and port values — You can obtain the remote host IP address and port number involved in the connection from the values of the
REMOTE-HOSTandREMOTE-PORTsocket attributes. Similarly, you can obtain the local host and port from theLOCAL-HOSTandLOCAL-PORTsocket attributes.- Disconnect a socket — You can close the socket and remove the association between the socket object and its remote port by invoking the
DISCONNECT( )socket method. Progress automatically closes the local socket when Progress detects that the corresponding remote socket in a connection is closed.- Delete the socket object — You can delete a socket object using the
DELETE OBJECTstatement. However, you must disconnect the socket before you can delete it.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |